import axios from "axios";

import {prefix} from './api'
import router from "@/router";
export async function getnavigationList() {

    let navigationList=[];
    await axios.get(
        prefix+'/getnavigationList'
    ).then(res=>{
       for(let route of res.data){
            navigationList.push({
                path:route.path,
                component:(resolve) => require([`@/views/`+route.component], resolve),
               meta:route.meta,
            })
       }
    })
    return navigationList
}

export async function getsuperstoreList() {
    let superstoreList=[];
    await axios.get(
        prefix+'/getsuperstoreList'
    ).then(res=>{
      const list=  res.data
      superstoreList=list;
   
    })
    return superstoreList
}
export async function getheadmessage() {
    let msg;
    await axios.get(
        prefix+'/getheadmessage'
    ).then(res=>{
        msg=res.data
    })
    return msg;
}
export async function getusphone() {
    let phone;
    await axios.get(
        prefix+'/getusphone'
    ).then(res=>{
        phone=res.data
    })
    return phone
}